package com.kingsoft.dc.khaos.plugin.core.metadata;

import com.kingsoft.dc.khaos.plugin.core.KhaosContext;
import com.kingsoft.dc.khaos.plugin.core.utils.Logging;

/**
 * plugin组件.
 */
public abstract class PluginModule extends Logging{
    public String moduleId;

    public KhaosContext khaosContext;

    public void init(String moduleId, KhaosContext khaosContext) {
        this.moduleId = moduleId;
        this.khaosContext = khaosContext;
    }

    public String getModuleId() {
        return moduleId;
    }

    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }

    public KhaosContext getKhaosContext() {
        return khaosContext;
    }

    public void setKhaosContext(KhaosContext khaosContext) {
        this.khaosContext = khaosContext;
    }

    public abstract Object prepare();

    public abstract Object execute() throws Exception;

    public abstract String getModuleConfiguration();
}
